package antempire.control.game.operation.wateroperation;

import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.opengl.texture.region.TextureRegion;

import antempire.control.game.GameConstants;

public class WaterVolumeSprite  extends Sprite implements GameConstants {

	public WaterVolumeSprite(float pX, float pY,
			TextureRegion waterVolumeTextureRegion) {
		super(pX, pY, waterVolumeTextureRegion);
	}

	@Override
	public void setHeight(float pHeight) {
		float pX, pY, origHeight;
		pX = super.getX();
		pY = super.getY();
		origHeight = super.getHeight();
		
		pY -= pHeight - origHeight;
		super.setPosition(pX, pY);
		super.setHeight(pHeight);
		
	}
	
}
